/**
 * 项目类型定义
 */

/**
 * API响应接口
 */
export interface ApiResponse<T = any> {
  code: number;
  message: string;
  data: T;
}

/**
 * 聊天消息
 */
export interface ChatMessage {
  id?: string;
  content: string;
  role: 'user' | 'assistant' | 'system';
  timestamp?: number;
  references?: Reference[];
}

/**
 * 引用来源
 */
export interface Reference {
  title: string;
  content: string;
  docBizId: string;
  confidence: number;
}

/**
 * 知识库分类
 */
export interface Category {
  cateBizId: string;
  name: string;
  total: number;
  children?: Category[];
  canAdd: boolean;
  canEdit: boolean;
  canDelete: boolean;
}

/**
 * 文档
 */
export interface Document {
  docBizId: string;
  fileName: string;
  fileType: string;
  size: string;
  status: number;
  statusDesc: string;
  qaNum: string;
  createTime: string;
  updateTime: string;
  category?: string;
  content?: string;
  description?: string;
}

/**
 * 分页结果
 */
export interface PaginatedResult<T> {
  total: number;
  list: T[];
}

/**
 * 存储凭证
 */
export interface StorageCredential {
  uploadPath: string;
  credentials: Record<string, any>;
}

// 分页参数
export interface PaginationParams {
  pageNumber: number;
  pageSize: number;
} 